/*
** case_get.c for  in /u/all/tessa_b/public/trantor
** 
** Made by arnaud1 tessa
** Login   <tessa_b@epitech.net>
** 
** Started on  Tue Jul  5 13:06:02 2011 arnaud1 
** Last update Sun Jul 10 12:58:34 2011 mouhamed faye
*/

#include	<stdio.h>
#include	"case.h"

int		case_remove_nourriture(t_case *c)
{
  if (c->resources.nourriture > 0)
    {
      c->resources.nourriture--;
      return (1);
    }
  return (0);
}

int		case_remove_linemate(t_case *c)
{
  if (c->resources.linemate > 0)
    {
      c->resources.linemate--;
      return (1);
    }
  return (0);
}

int		case_remove_deraumere(t_case *c)
{
  if (c->resources.deraumere > 0)
    {
      c->resources.deraumere--;
      return (1);
    }
  return (0);
}

int		case_remove_sibur(t_case *c)
{
  if (c->resources.sibur > 0)
    {
      c->resources.sibur--;
      return (1);
    }
  return (0);
}

int		case_remove_mendiane(t_case *c)
{
  if (c->resources.mendiane > 0)
    {
      c->resources.mendiane--;
      return (1);
    }
  return (0);
}

int		case_remove_phiras(t_case *c)
{
  if (c->resources.phiras > 0)
    {
      c->resources.phiras--;
      return (1);
    }
  return (0);
}

int		case_remove_thystame(t_case *c)
{
  if (c->resources.thystame > 0)
    {
      c->resources.thystame--;
      return (1);
    }
  return (0);
}

/*
int		main()
{
  t_case	c;
  int		res;

  case_init(&c);
  c.resources.sibur = -1;
  res = case_get_sibur(&c);
  printf("%d\n", res);
}
*/
